<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../../../print.css" type="text/css" media="print">
<meta content="Filter,org.puremvc.as3.multicore.utilities.pipes.plumbing.Filter,filter,mode,name,params,applyFilter,isTarget,setFilter,setParams,write" name="keywords">
<title>org.puremvc.as3.multicore.utilities.pipes.plumbing.Filter</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Filter - API Documentation';
				var baseRef = '../../../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">PureMVC AS3 MultiCore Pipes Utility</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../../../all-classes.html')" href="../../../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../../../all-classes.html')" href="../../../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../../../index-list.html')" href="../../../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../../../index.html?org/puremvc/as3/multicore/utilities/pipes/plumbing/Filter.html&amp;org/puremvc/as3/multicore/utilities/pipes/plumbing/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Filter</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Filter"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.puremvc.as3.multicore.utilities.pipes.plumbing</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Filter</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Filter <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../../../../images/inherit-arrow.gif"> <a href="Pipe.html">Pipe</a></td>
</tr>
</table>
<p></p>
  Pipe Filter.
  <P>
  Filters may modify the contents of messages before writing them to 
  their output pipe fitting. They may also have their parameters and
  filter function passed to them by control message, as well as having
  their Bypass/Filter operation mode toggled via control message.</p>  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a><a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedProperty" id="hideInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(false,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Properties</a>
</div>
<div class="showInheritedProtectedProperty" id="showInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(true,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Properties</a>
</div>
</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#filter">filter</a> : Function<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#mode">mode</a> : String<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#name">name</a> : String<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="Pipe.html#output">output</a> : <a href="../interfaces/IPipeFitting.html">IPipeFitting</a>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="Pipe.html">Pipe</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#params">params</a> : Object<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Filter()">Filter</a>(name:String, output:<a href="../interfaces/IPipeFitting.html">IPipeFitting</a> = null, filter:Function = null, params:Object = null)</div>
<div class="summaryTableDescription">
   Constructor.</div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="Pipe.html#connect()">connect</a>(output:<a href="../interfaces/IPipeFitting.html">IPipeFitting</a>):Boolean</div>
<div class="summaryTableDescription">
   Connect another PipeFitting to the output.</div>
</td><td class="summaryTableOwnerCol"><a href="Pipe.html">Pipe</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="Pipe.html#disconnect()">disconnect</a>():<a href="../interfaces/IPipeFitting.html">IPipeFitting</a>
</div>
<div class="summaryTableDescription">
   Disconnect the Pipe Fitting connected to the output.</div>
</td><td class="summaryTableOwnerCol"><a href="Pipe.html">Pipe</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setFilter()">setFilter</a>(filter:Function):void</div>
<div class="summaryTableDescription">
   Set the Filter function.</div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setParams()">setParams</a>(params:Object):void</div>
<div class="summaryTableDescription">
   Set the Filter parameters.</div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#write()">write</a>(message:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):Boolean</div>
<div class="summaryTableDescription">
   Handle the incoming message.</div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#applyFilter()">applyFilter</a>(message:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>
</div>
<div class="summaryTableDescription">
   Filter the message.</div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isTarget()">isTarget</a>(m:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):Boolean</div>
<div class="summaryTableDescription">
   Is the message directed at this filter instance?
   </div>
</td><td class="summaryTableOwnerCol">Filter</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="filter"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">filter</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>protected var filter:Function</code>
</div>
<a name="mode"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">mode</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var mode:String</code>
</div>
<a name="name"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">name</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var name:String</code>
</div>
<a name="params"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">params</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var params:Object</code>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Filter()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Filter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Filter(name:String, output:<a href="../interfaces/IPipeFitting.html">IPipeFitting</a> = null, filter:Function = null, params:Object = null)</code><p>
   Constructor.
   <P>
   Optionally connect the output and set the parameters.</P>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">output</span>:<a href="../interfaces/IPipeFitting.html">IPipeFitting</a></code> (default = <code>null</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">filter</span>:Function</code> (default = <code>null</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">params</span>:Object</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="applyFilter()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">applyFilter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function applyFilter(message:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):<a href="../interfaces/IPipeMessage.html">IPipeMessage</a></code><p>
   Filter the message.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">message</span>:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../interfaces/IPipeMessage.html">IPipeMessage</a></code></td>
</tr>
</table>
</div>
<a name="isTarget()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isTarget</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function isTarget(m:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):Boolean</code><p>
   Is the message directed at this filter instance?
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">m</span>:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="setFilter()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setFilter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setFilter(filter:Function):void</code><p>
   Set the Filter function.
   <P>
   It must accept two arguments; an IPipeMessage, 
   and a parameter Object, which can contain whatever 
   arbitrary properties and values your filter method 
   requires.</P>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">filter</span>:Function</code> &mdash; the filter function. 
   </td>
</tr>
</table>
</div>
<a name="setParams()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setParams</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setParams(params:Object):void</code><p>
   Set the Filter parameters.
   <P>
   This can be an object can contain whatever arbitrary 
   properties and values your filter method requires to
   operate.</P>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">params</span>:Object</code> &mdash; the parameters object
   </td>
</tr>
</table>
</div>
<a name="write()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">write</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function write(message:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a>):Boolean</code><p>
   Handle the incoming message.
   <P>
   If message type is normal, filter the message (unless in BYPASS mode)
   and write the result to the output pipe fitting if the filter 
   operation is successful.</P>
   
   <P> 
   The FilterControlMessage.SET_PARAMS message type tells the Filter
   that the message class is FilterControlMessage, which it 
   casts the message to in order to retrieve the filter parameters
   object if the message is addressed to this filter.</P> 
   
   <P> 
   The FilterControlMessage.SET_FILTER message type tells the Filter
   that the message class is FilterControlMessage, which it 
   casts the message to in order to retrieve the filter function.</P>
   
   <P> 
   The FilterControlMessage.BYPASS message type tells the Filter
   that it should go into Bypass mode operation, passing all normal
   messages through unfiltered.</P>
   
   <P>
   The FilterControlMessage.FILTER message type tells the Filter
   that it should go into Filtering mode operation, filtering all
   normal normal messages before writing out. This is the default
   mode of operation and so this message type need only be sent to
   cancel a previous BYPASS message.</P>
   
   <P>
   The Filter only acts on the control message if it is targeted 
   to this named filter instance. Otherwise it writes through to the
   output.</P>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">message</span>:<a href="../interfaces/IPipeMessage.html">IPipeMessage</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean True if the filter process does not throw an error and subsequent operations 
   in the pipeline succede.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
